import React ,{ Suspense}from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { RouterProvider}  from "react-router-dom"
import router from "./router"
import store from './store';
import { Provider } from 'react-redux';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <>
   <Provider store={store}>
    
    <Suspense fallback={<div>loading...</div>}>
    <RouterProvider  router={router}></RouterProvider>
    </Suspense>
    </Provider>
    {/* <App /> */}
  </>
);

document.title = "项目管理系统";


// import { StrictMode,Suspense } from 'react'
// import { createRoot } from 'react-dom/client'
// import './index.css'
// import App from './App.jsx'
// import { RouterProvider}  from "react-router-dom"
// import { Provider } from 'react-redux'
// import store from './store/index.js'
// import router from './router/index.js'

// createRoot(document.getElementById('root')).render(
//   <StrictMode>
//     <Suspense fallback={<div>loading...</div>}>
//     <Provider store={store}>
//       <RouterProvider  router={router}></RouterProvider>
//       <App />
//     </Provider>
//     </Suspense>
    
//   </StrictMode>,
// )

